<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 会议记录数据表
 *
 * Date: 19/03/2018
 * @author George
 */
class CreateConferencesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('conferences', function (Blueprint $table) {
            $table->increments('id');
			$table->unsignedInteger('company_id')->index()->comment('公司ID');
			$table->json('projects')->comment('项目ID和名称');
            $table->string('type')->comment('会议类型');
            $table->date('start_time')->comment('会议开始时间');
            $table->date('end_time')->comment('会议结束时间');
            $table->integer('initiator_id')->comment('发起人ID');
            $table->string('initiator')->comment('发起人');
            $table->json('attendees')->comment('参与人ID和名称');
            $table->string('content')->comment('会议内容');
            $table->string('comment')->nullable()->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('conferences');
    }
}
